package com.mumu.jetpackdemo.lifecycle;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
import android.arch.lifecycle.OnLifecycleEvent;
import android.util.Log;

/**
 * edie create on 2019/3/25
 */
public class MyObserver implements LifecycleObserver {
    private static final String TAG = "MyObserver";

    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    public void contentOnCreate() {
        Log.d(TAG, "contentOnCreate: ");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    protected void contentOnStart() {
        Log.d(TAG, "contentOnStart: ");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    protected void contentOnStop() {
        Log.d(TAG, "contentOnStop: ");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    protected void contentOnDestroy() {
        Log.d(TAG, "contentOnDestroy: ");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    protected void contentOnPause() {
        Log.d(TAG, "contentOnPause: ");
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    protected void contentOnResume() {
        Log.d(TAG, "contentOnResume: ");
    }
}
